package com.atguigu.test.config;

import com.atguigu.test.lifecycle.MyInstantiationAwareBeanPostProcessor;
import com.atguigu.test.po.UserProxy;
import com.atguigu.test.processor.MyVerifyBeanPostProcessor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author zp
 * @version 1.0
 * @description: 配置类
 * @date 2022/12/24 20:04
 */
@Configuration
public class SpringPostProcessorConfig {
    @Bean
    public UserProxy userProxy(){
        UserProxy userProxy = new UserProxy();
        userProxy.setBeanName("userProxy");
        userProxy.setIdName("userProxy");
        return userProxy;
    }
    @Bean
    public MyInstantiationAwareBeanPostProcessor myInstantiationAwareBeanPostProcessor(){
        return new MyInstantiationAwareBeanPostProcessor();
    }

    @Bean
    public MyVerifyBeanPostProcessor myVerifyBeanPostProcessor(){
        return new MyVerifyBeanPostProcessor();
    }
}
